import request from '@/utils/processRequest';

export function getCommonDataByUrl(data, url, method = 'post') {
  const requestData = {
    url,
    method
  };

  if (method === 'post') {
    requestData.data = data;
  } else {
    requestData.params = data;
  }
  return request(requestData);
}
